package com.caishi.lkx.user.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.caishi.lkx.common.ienum.AgentType;
import com.caishi.lkx.user.ienum.status.UserStatus;
import com.zzw.common.service.model.NameModel;
import com.zzw.common.service.model.base.BaseTreeModel;

import lombok.*;

import java.math.BigDecimal;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("cu_agent_user")
public class AgentUserModel extends IUserModel<AgentUserModel> implements BaseTreeModel<AgentUserModel, String>,NameModel<AgentUserModel, String> {
    private String parentId;
    private String levelId;
    /**
     * @Param:
     * @return
     * @Author: huangpeng
     * @Date: 2021/9/26 15:27
     * @Description: 余额
     */

    private Long banance;

    /**
     * @Param:
     * @return
     * @Author: huangpeng
     * @Date: 2021/9/26 15:27
     * @Description: 累计充值
     */
    private Long accumulativeRecharge;
    /**
     * @Param:
     * @return
     * @Author: huangpeng
     * @Date: 2021/9/26 15:27
     * @Description: 累计消费
     */
    private Long cumulativeConsumption;

    /** 绑定平台*/
    private Long bindGroupId;

    /** 代理商类型 */
    private AgentType agentType;

    @Override
    public AgentUserModel InstanceThisObj() {
        return new AgentUserModel();
    }

    @Override
    public AgentUserModel clearSensitiveData() {
        super.clearSensitiveData();
        return this;
    }

    @TableField(exist = false)
    private UserStatus userStatus;
    @TableField(exist = false)
    private String positionName;
    @TableField(exist = false)
    private String createdByName;
    @TableField(exist = false)
    private String userName;
    @TableField(exist = false)
    private BigDecimal discount;
    @TableField(exist = false)
    private List<PositionModel> positions;

    @TableField(exist = false)
    private List<ActionRoleModel> roles;
    @TableField(exist = false)
    private AgentUserModel parent;

    @TableField(exist = false)
    private List<AgentUserModel> children;
    @TableField(exist = false)
    private String levelName;

}
